import requests
from bs4 import BeautifulSoup

url = 'http://www.netbian.com/s/lol/'
ret = requests.get(url)
ret.encoding = 'gbk'
page = BeautifulSoup(ret.text,'html.parser')
content = page.find('div',attrs={
    "class":"list"
}).find('ul').find_all('li')
for i in content:
    src = i.find('img').get('src')
    ret = requests.get(src)
    file_name = src.split('/')[-1]
    with open('img/'+file_name,'wb') as f:
        print('正在下载'+file_name)
        f.write(ret.content)
    ret.close()

ret.close()